package cn.com.digitalnet.ad.repository.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import cn.com.digitalnet.ad.entity.Permission;
import cn.com.digitalnet.ad.entity.Role;
import cn.com.digitalnet.ad.entity.User;
import cn.com.digitalnet.ad.repository.mybatis.annotation.MyBatisRepository;

@Component
@MyBatisRepository
public interface UserMao extends CrudMao<User>{
	public List<Role> getRolesForUser(Long userId);
	public List<Permission> getPermissionsForUser(Long userId);
	
	public void cleanRolesForUser(Long userId);
	public void addRoleForUser(Map<String, Object> params);
	
	public void cleanAccountsForUser(Long userId);
	public void addAccountForUser(Map<String, Object> params);
	
	public void cleanBrandsForUser(Long userId);
	public void addBrandForUser(Map<String, Object> params);
	
	public void cleanMediasForUser(Long userId);
	public void addMediaForUser(Map<String, Object> params);
}
